home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
ddj9304.zip
/
WAVELET.ZIP
/
ANALYZER.L_C
< prev
next >
Wrap
Text File
|
1992-04-17
|
11KB
|
200 lines
Creation date: Fri Apr 17 11:30:03 1992 analyzer.s page 1
Address Instruction Line # Source line
1 #include "dsp_type.h"
1 #define DSP32C 1
4 #endif
5
6 .extern DECOMP, DRAWIMAG
7 .extern WAVEADRS, WAVELVLS, IMAGSHOW, LVLADDRS
8 .extern SIG_DRAW, DRAW_CNT, H_FILTER, L_FILTER
9 .extern RST_DATA, IM0_PTRS, IM1_PTRS, IMAGE_0
10 .extern STACKEND, SIGNALIN, DATA_OUT
11
12 /* ANALYZER
13 main control program for the wavelet analyzer
14 registers used: r1 r2 r3 r4 r5 r6 r8 r9
15 r11 r12 r13 r14 r15 r16 r17
16 accumulators used: a0 a1 a2 a3
17 */
18 .rsect ".bank0"
0000 17400000 19 dauc = 0x0000; /* initialize DAU formats */
0004 c0010000 20 r1e = WAVELVLS; /* point to jump address for wavelet filter size */
0008 c0020000 21 r2e = SIGNALIN; /* point to approximation data storage */
000c 1ea30037 22 r3 = *r1++; /* load number of levels in wavelet transform */
0010 14800008 23 r4 = 8; /* load number of unit intervals per image */
0014 94210002 24 r1e = r1 + 2; /* point to the unit interval count storage */
0018 1fa40037 25 *r1++ = r4; /* store the unit interval count value */
001c 18840080 26 r4 = r4 - r4; /* zero the register */
0020 1fa40037 27 *r1++ = r4; /* set active image flag storage to 0 (IMAGE 0) */
0024 34e0c187 28 a3 = a3 - a3; /* intial data value is zero */
29 #if DSP32C
0028 188302e0 30 r3 = r3 - 1; /* number of levels in wavelet transform - 1 */
002c 8c280003 31 do 8, r3; /* repeat next nine instructions r5+1 times */
34 #endif
0030 1fe20037 35 INITAPPX: *r1++ = r2e; /* store base address of each approximation level */
0034 30600197 36 *r2++ = a3 = a3; /* zero storage for approximation level */
0038 30600197 37 *r2++ = a3 = a3; /* r2 ends up pointing to first location .... */
003c 30600197 38 *r2++ = a3 = a3; /* in the next approximation level */
0040 30600197 39 *r2++ = a3 = a3;
0044 30600197 40 *r2++ = a3 = a3;
0048 30600197 41 *r2++ = a3 = a3;
42 #if DSP32C
004c 00000000 43 nop;
0050 1fe20037 44 *r1++ = r2e; /* store the next location */
0054 17640987 45 ioc = 0x40987; /* initialize the serial I/O to the codec */
0058 c0010000 46 r1e = RST_DATA; /* point to reset pointer initialization storage */
005c c0020000 47 r2e = SIG_DRAW; /* point to signal drawing data sets */
0060 1460001a 48 r3 = 26; /* integer pointer index, 4 bytes per pointer */
0064 94420016 49 r2e = r2 + 22; /* point to bit pointer storage */
0068 8c030007 50 do 3, 7; /* perform next 4 instructions eight times */
006c 1ee40037 51 r4e = *r1++; /* load initial bit pointer */
0070 1ee50037 52 r5e = *r1++; /* load initial byte column pointer */
0074 1fa40057 53 *r2++ = r4; /* store initial bit pointer */
0078 1fe50043 54 *r2++r3 = r5e; /* store initial byte column pointer */
69 #endif
007c c00c0000 70 r12e = WAVEADRS; /* load pointer to filter jump address */
0080 c00d0000 71 r13e = STACKEND; /* load pointer to top of stack memory */
0084 1eeb0197 72 r11e = *r12++; /* load jump address for filter size */
0088 1ef20197 73 r16e = *r12++; /* load coefficient pointer wrap back index */
008c 1eb30197 74 r17 = *r12++; /* load number of levels */
0090 1eb10190 75 r15 = *r12; /* load image data space size / 4 */
0094 c0030000 76 r3e = IMAGE_0; /* point to the detail level float output */
77 #if DSP32C
Creation date: Fri Apr 17 11:30:04 199 analyzer.s page 2
Address Instruction Line # Source line
0098 189102e0 78 r15 = r15 - 1; /* number of data points minus one */
009c 8c200011 79 do 0, r15; /* repeat next instruction r15+1 times */
00a0 3060019f 80 *r3++ = a3 = a3; /* clear four bytes in IMAGE_0 array */
85 #endif
00a4 a0000180 86 goto ENTRY_PT; /* jump to the entry point */
00a8 00000000 87 nop;
88
00ac 15000000 89 MAINLOOP: r8 = DATA_OUT; /* point to output data array */
00b0 c00c0000 90 r12e = SIG_DRAW; /* point to signal drawing data sets */
00b4 c0090000 91 r9e = DRAW_CNT; /* point to draw count array */
00b8 30002387 92 a0 = *r8++; /* load first signal data point */
00bc 98090220 93 r9e = r9 + r15; /* index into draw count array */
00c0 e00e0000 94 call DRAWIMAG (r14); /* draw the first input sample point */
00c4 1e690130 95 r9l = *r9; /* load the draw loop counter */
00c8 c00c0000 96 r12e = SIG_DRAW; /* point to signal drawing data sets */
00cc 042000f4 97 DRWLOOP1: if (ibf) goto SAMPL_IN; /* if true, next sample available */
00d0 00000000 98 nop;
00d4 30002387 99 a0 = *r8++; /* load data point */
00d8 e00e0000 100 call DRAWIMAG (r14); /* draw data point */
00dc 00000000 101 nop;
00e0 0d2000cc 102 if (r9-- >= 0) goto DRWLOOP1; /* repeat for all levels of xfrm */
103 #if DSP32C
00e4 00000000 104 nop;
107 #endif
00e8 040000e8 108 WAITIBF1: if (ibe) goto WAITIBF1; /* wait until next data sample arrives */
00ec 00000000 109 nop;
00f0 a000010c 110 goto TEST_LVL;
00f4 79600207 111 SAMPL_IN: a3 = float(ibuf); /* load the new signal sample */
00f8 30002387 112 DRWLOOP2: a0 = *r8++; /* load data point */
00fc e00e0000 113 call DRAWIMAG (r14); /* draw data point */
0100 00000000 114 nop;
0104 0d2000f8 115 if (r9-- >= 0) goto DRWLOOP2;
116 #if DSP32C
0108 00000000 117 nop;
120 #endif
010c 1af10000 121 TEST_LVL: r15 - 0; /* test for process of all levels */
0110 00800180 122 if (ne) goto ENTRY_PT; /* if true, all levels have not been done */
0114 c00c0000 123 r12e = IMAGSHOW; /* point to the unit interval count down */
0118 00000000 124 nop;
011c 1ea30197 125 r3 = *r12++; /* load the unit interval count down */
0120 1ea40196 126 r4 = *r12--; /* load the image draw flag */
0124 188302e0 127 r3 = r3 - 1; /* decrement the unit interval count */
0128 00800180 128 if (ne) goto ENTRY_PT; /* if true, not done with new data set */
012c 1fa30197 129 *r12++ = r3; /* save the new count */
0130 14600008 130 r3 = 8; /* reset count to eight unit intervals */
0134 1a8c0002 131 r12 = r12 - 2; /* point to unit interval count storage */
0138 1fa30197 132 *r12++ = r3; /* save the reset count */
013c 1f840016 133 pir = r4; /* interrupt host processor for new image */
0140 18040a04 134 r4 = r4; /* tickle CAU flags for image set */
0144 00800158 135 if (ne) goto IM0_NEXT; /* if true, set up for drawing on IMAGE 0 */
0148 00000000 136 nop;
014c 14800001 137 r4 = 1; /* next image displayed is IMAGE 1 */
0150 a0000160 138 goto PNTRINIT; /* go to image pointer initialization */
0154 c0020000 139 r2e = IM1_PTRS; /* set up for drawing on IMAGE 1 */
140
0158 14800000 141 IM0_NEXT: r4 = 0; /* next image displayed is IMAGE 0 */
015c c0020000 142 r2e = IM0_PTRS; /* set up for drawing on IMAGE 0 */
0160 14200000 143 PNTRINIT: r1 = SIG_DRAW; /* point to signal drawing data sets */
0164 1fa40197 144 *r12++ = r4; /* save the image draw flag */
0168 94210018 145 r1e = r1 + 24; /* point to byte column pointer storage */
Creation date: Fri Apr 17 11:30:06 199 analyzer.s page 3
Address Instruction Line # Source line
146 #if DSP32C
016c c011001c 147 r15e = 28; /* set up post increment value */
0170 8c000007 148 do 0, 7; /* perform next instruction eight times */
0174 38000b89 149 a0 = (*r1++r15 = *r2++) + a0; /* moves four bytes at once! */
156 #endif
0178 04e00178 157 WAIT_PIE: if (pif) goto WAIT_PIE; /* wait for pif flag to be cleared */
017c 00000000 158 nop;
0180 c0030000 159 ENTRY_PT: r3e = SIGNALIN; /* point to input signal storage array */
0184 04000184 160 WAITIBF2: if (ibe) goto WAITIBF2; /* wait until next data sample arrives */
0188 18110a13 161 r15 = r17; /* inititialize the recursion counter */
018c 7940021f 162 *r3++ = a2 = float(ibuf); /* output second data sample first */
0190 c0060000 163 r6e = DATA_OUT; /* point to output data array */
0194 30600198 164 *r3 = a3 = a3; /* output first data sample last */
0198 306001b7 165 *r6++ = a3 = a3; /* place first sample in data output array */
019c 30400137 166 *r6++ = a2 = a2; /* place second sample in data output array */
01a0 c0010000 167 r1e = H_FILTER; /* point to detail filter coefficients */
01a4 c0020000 168 r2e = L_FILTER; /* point to approx. filter coefficients */
01a8 c00c0000 169 r12e = LVLADDRS; /* point to data level address pointers */
01ac 34800007 170 a0 = a0 - a0; /* zero the accumulators */
01b0 e00e0000 171 call DECOMP (r14); /* start the recursive decomposition */
01b4 30200007 172 a1 = a0;
01b8 a00000ac 173 goto MAINLOOP;
01bc 00000000 174 nop;
d3as:warning:analyzer.s line 95: branch dest can't start with inst referencing
reg being loaded
Symbol Table
.file analyzer.s
.bank0 (section 1) size 0x1c0
TEST_LVL section 1 defined value 0x10c
DATA_OUT section 255 external value 0x0
SIGNALIN section 255 external value 0x0
STACKEND section 255 external value 0x0
IMAGSHOW section 255 external value 0x0
IM0_PTRS section 255 external value 0x0
H_FILTER section 255 external value 0x0
IM0_NEXT section 1 defined value 0x158
DECOMP section 255 external value 0x0
SAMPL_IN section 1 defined value 0xf4
WAITIBF1 section 1 defined value 0xe8
WAVEADRS section 255 external value 0x0
WAITIBF2 section 1 defined value 0x184
RST_DATA section 255 external value 0x0
ENTRY_PT section 1 defined value 0x180
WAVELVLS section 255 external value 0x0
DRAWIMAG section 255 external value 0x0
INITAPPX section 1 defined value 0x30
LVLADDRS section 255 external value 0x0
WAIT_PIE section 1 defined value 0x178
DRWLOOP1 section 1 defined value 0xcc
DRWLOOP2 section 1 defined value 0xf8
PNTRINIT section 1 defined value 0x160
IMAGE_0 section 255 external value 0x0
MAINLOOP section 1 defined value 0xac
IM1_PTRS section 255 external value 0x0
DRAW_CNT section 255 external value 0x0
SIG_DRAW section 255 external value 0x0
L_FILTER section 255 external value 0x0